<?php
/* @var $this CustomerResidentController */
/* @var $model CustomerResident */

$this->breadcrumbs=array(
	'Customer SM Tenants'=>array('index'),
	'Manage',
);

if ((Yii::app()->user->type==="Personnel")) {

$this->menu=array(
	array('label'=>'List', 'url'=>array('index')),
);

}else {
$this->menu=array(
	array('label'=>'List', 'url'=>array('index')),
	array('label'=>'Create', 'url'=>array('create')),
	);
	}
	
Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#customer-resident-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1>Manage Customer SM Tenants</h1>



<?php echo CHtml::link('Advanced Search','#',array('class'=>'search-button')); ?>
<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'customer-resident-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		'id',
		'sm_storename',
		'sm_storemanager',
		'sm_mallbranch',
		'contact_main',
		'sm_storetype',
		/*
		'sm_telnum',
		'contact_address',
		'contact_maintel',
		'contact_email',
		'contact_name',
		'contact_telnum',
		*/
		array(
			'class'=>'CButtonColumn',
		),
	),
)); ?>
